<%--
  Created by IntelliJ IDEA.
  User: Lenovo
  Date: 2021-11-29
  Time: 11:26
  To change this template use File | Settings | File Templates.
--%>
<%@ page isELIgnored="false"  contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
    <script>
        function deleteStudent(id){
            if(confirm("确认要删除此条信息吗？")){
                location.href="delete?id="+id;
            }else{
                return;
            }
        }
    </script>
</head>
<body>
    <h3>学生信息管理系统</h3>
        <div style="text-align: right;float: right">
            <a href="addPage"> 添加</a>
        </div>
    <hr>

    <c:forEach var="s" items="${list}">
        ${s.name}&nbsp;<a href="updatePage?id=${s.id}">修改</a>
            &nbsp;<a href="javascript:void(0)" onclick="deleteStudent(${s.id})">删除</a>
        <br>
    </c:forEach>
</body>
</html>
